﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Nvigorate.Data.Query
{
    [Serializable]
    public class RaiseError : IQueryObject
    {
        protected Reference _errorMessage;
        protected Reference _errorCode;
        protected Reference _severity;

        public Reference ErrorMessage
        {
            get { return _errorMessage; }
            set { _errorMessage = value; }
        }

        public Reference ErrorCode
        {
            get { return _errorCode; }
            set { _errorCode = value; }
        }

        public Reference Severity
        {
            get { return _severity; }
            set { _severity = value; }
        }

        public static RaiseError Message(string message, int severity, long code)
        {
            return new RaiseError()
                       {
                           ErrorMessage = QueryValue.Reference(message), 
                           Severity = QueryValue.Reference(severity), 
                           ErrorCode = QueryValue.Reference(code)
                       };
        }

        public XElement GetXElementRepresentation()
        {
            throw new System.NotImplementedException();
        }

        public object ParseXElement(XElement element)
        {
            throw new System.NotImplementedException();
        }
    }
}
